/////////////////////////////////////////////////////////////////////////////
// Name:        tts_cepstral.h
// Purpose:     A wxWidgets wrapper around Cepstral voices (swift)
// Author:      Julian Smart
// Modified by: 
// Created:     2009-02-10
// RCS-ID:      
// Copyright:   (c) Julian Smart
// Licence:     New BSD License
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_TTS_CEPSTRAL_
#define _WX_TTS_CEPSTRAL_

/*
 * Includes
 */

#include "tts/tts_process.h"

/*
 * Styles and types
 */

/**
    @class wxTTSCepstralHandler
    
    @category{tts}
 */

class wxTTSCepstralHandler: public wxTTSExternalCommandHandler
{    
    DECLARE_DYNAMIC_CLASS( wxTTSCepstralHandler )

public:
// Constructors

    wxTTSCepstralHandler();
    ~wxTTSCepstralHandler();

// Operations

    /// Member initialisation
    void Init();

    /// Initialize the engine. Can call multiple times.
    virtual bool Initialize() { return true; }

    /// Clean up the engine. Can call multiple times.
    virtual bool Uninitialize() { return true; }

    /// Speak the text
    virtual bool Speak(const wxString& text, int options = wxTTS_SPEAK_ASYNC);

    /// Speak the file
    virtual bool SpeakFile(const wxString& filename, int options = wxTTS_SPEAK_ASYNC, const wxString& waveFilename = wxEmptyString);

    /// Speak the text or file
    virtual bool DoSpeak(const wxString& textOrFilename, bool isFilename, int options = wxTTS_SPEAK_ASYNC, const wxString& waveFilename = wxEmptyString);

    /// Is it speaking?
    virtual bool IsSpeaking() const { return (GetProcess() != NULL); }

    /// Get a list of the available voices
    virtual wxArrayString GetAvailableVoices() const;

    /// Get a list of the available voice variants
    virtual wxArrayString GetAvailableVoiceVariants() const;

    /// Does this handler have the specified capability?
    virtual bool HasCapability(wxTTSCapability capability) const;

    virtual int GetMinSpeed() const { return 80; }
    virtual int GetMaxSpeed() const { return 390; }
    virtual int GetMinVolume() const { return 0; }
    virtual int GetMaxVolume() const { return 100; }

    // Native pitch control is a multiplication factor,
    // but convert to percentage for wxTextToSpeech.
    // 50 would be the default.
    virtual int GetMinPitch() const { return 0; }
    virtual int GetMaxPitch() const { return 100; }

    /// Get the default voice
    virtual wxString GetDefaultVoice() const;

    /// Get the default voice variant
    virtual wxString GetDefaultVoiceVariant() const;

    /// Get a list of the available voices, given the voices directory
    static wxArrayString GetAvailableVoicesForDir(const wxString& voicesDir);

protected:
};

#endif
    // _WX_TTS_CEPSTRAL_
